import requests from './request.js'

// 获取所有视频列表
export function getVideoTableData(query, searchVideoForm) {
	return requests({
		url: '/system/video/getVideoTableData',
		method: 'get',
		params: {
			...query,
			...searchVideoForm
		}
	})
}

// 通过视频ID获取视频详情
export function getVideo(vid) {
	return requests({
		url: '/system/video/getVideoDetail/' + vid,
		method: 'get'
	})
}

// 编辑视频
export function modifyVideo(videoInfo) {
	return requests({
		url: '/system/video/modifyVideo',
		method: 'put',
		data: videoInfo
	})
}

// 删除视频
export function deleteVideo(vid) {
	return requests({
		url: '/system/video/deleteVideo/' + vid,
		method: 'delete'
	})
}

// 获取平台访问日志
export function queryAllVideoLog(query) {
	return requests({
		url: '/system/video/queryAllVideoLog',
		method: 'get',
		params: query
	})
}